* lisp/newcomment.el (comment-normalize-vars): Better test validity of
authorStefan Monnier <monnier@iro.umontreal.ca>
Tue, 21 Sep 2010 13:09:22 +0000 (15:09 +0200)
committerStefan Monnier <monnier@iro.umontreal.ca>
Tue, 21 Sep 2010 13:09:22 +0000 (15:09 +0200)
comment-end-skip.

lisp/ChangeLog
lisp/newcomment.el

index 387121a844fe3b4aa4a865e625f003f5ea77050e..6cd75486869bd97bc29b42148a79d31abf76ac8c 100644 (file)
@@ -1,3 +1,8 @@
+2010-09-21  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * newcomment.el (comment-normalize-vars): Better test validity of
+       comment-end-skip.
+
 2010-09-19  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * emacs-lisp/float-sup.el (float-pi): New name for `pi'.
index 5d2da4673473745367fe71e6d147a52da476ac6e..1e40317c9a148e1f5e038ee0cfef739301c33f94 100644 (file)
@@ -318,7 +318,8 @@ the variables are properly set."
                   "+\\)[ \t]*")))
     (unless (and comment-end-skip
                 ;; In case comment-end has changed since last time.
-                (string-match comment-end-skip comment-end))
+                (string-match comment-end-skip
+                               (if (string= "" comment-end) "\n" comment-end)))
       (let ((ce (if (string= "" comment-end) "\n"
                  (comment-string-strip comment-end t t))))
        (set (make-local-variable 'comment-end-skip)